<div class="scrollbox">
  <table>
    <thead>
      <tr>
        <th class="sta-name">姓名</th>
        <th class="sta-sex">性别</th>
        <th class="sta-dep">部门</th>
        <th class="sta-pos">职位</th>
        <th class="sta-branch">分店</th>
        <th class="sta-state">状态</th>
        <th class="sta-operation">操作</th>
      </tr>
    </thead>
    <tbody>
      <% @employees.each do |employee| %>
        <tr>
          <td class="sta-name">
            <span><%= employee.name %></span>
            <%if employee.birthday.present? %> 
              <%if Date.parse("#{employee.birthday}").month == Date.current.month %>
                <div><em><%= employee.birthday.try("strftime","%m-%d") %></em></div>
              <% end %>
            <% end %>
          </td>
          <td><%= employee.sex %></td>
          <td><%= employee.one_department %></td>
          <td><%= employee.one_position %></td>
          <td><%= employee.one_studio %></td>
          <td><%= employee.status %></td>
          <td class="sta-operation">
            <span>[</span>
            <%= link_to '查看详情', admin_employee_path(employee) %>
            <span>]</span>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <div class="apple_pagination">
    <%= paginate @employees, :container => false %>
  </div>
</div>
